function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;
Returns True if the specified registry key exists.
begin if RegKeyExists(HKEY_CURRENT_USER, 'Software\Jordan Russell\Inno Setup') then begin // The key exists end; end;